import { createPinia } from 'pinia'
import { createPersistedState } from 'pinia-plugin-persistedstate'
const pinia = createPinia()

pinia.use(
  createPersistedState({
    key(storeKey) {
      return `store-${storeKey}`
    },
    storage: sessionStorage,
  }),
)
export default pinia
